//
//  ViewController.swift
//  ZLSafeCodeKeyboard
//
//  Created by zzl on 01/10/2023.
//  Copyright (c) 2023 zzl. All rights reserved.
//

import UIKit
import ZLSafeCodeKeyboard

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        /// 自定义标题
//        let keyboard = ZLSafeCodeKeyboard.show { pwd in
//            print(pwd)
//            if pwd == "666666" {
//                /// 密码正确自动隐藏
//                return true
//            }
//            return false
//        }
//        keyboard.title = "自定义标题"
        
        /// 默认标题
        ZLSafeCodeKeyboard.show { pwd in
            print(pwd)
            if pwd == "666666" {
                /// 密码正确自动隐藏
                return true
            }
            return false
        }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

